import request from '@/utils/request'

// 查询结账记录列表
export function listFiscalRecord(query) {
  return request({
    url: '/payfee/fiscalRecord/list',
    method: 'get',
    params: query
  })
}

// 查询结账记录详细
export function getFiscalRecord(id) {
  return request({
    url: '/payfee/fiscalRecord/' + id,
    method: 'get'
  })
}

// 新增结账记录
export function addFiscalRecord(data) {
  return request({
    url: '/payfee/fiscalRecord',
    method: 'post',
    data: data
  })
}

// 修改结账记录
export function updateFiscalRecord(data) {
  return request({
    url: '/payfee/fiscalRecord',
    method: 'put',
    data: data
  })
}

// 删除结账记录
export function delFiscalRecord(id) {
  return request({
    url: '/payfee/fiscalRecord/' + id,
    method: 'delete'
  })
}

// 导出结账记录
export function exportFiscalRecord(query) {
  return request({
    url: '/payfee/fiscalRecord/export',
    method: 'get',
    params: query
  })
}

// 结账前检查
export function fiscalBeforeCheck(data) {
  return request({
    url: '/payfee/fiscalRecord/fiscalBeforeCheck',
    method: 'post',
    data: data
  })
}


// 结账
export function fiscal(data) {
  return request({
    url: '/payfee/fiscalRecord/fiscal',
    method: 'post',
    data: data
  })
}

// 反结账
export function backFiscal(data) {
  return request({
    url: '/payfee/fiscalRecord/backFiscal',
    method: 'post',
    data: data
  })
}
